Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds functionality for patch-based configuration #839

Merged
merged 12 commits into from
Sep 27, 2023
Merged

Conversation

boehmseb
Copy link
Member

@boehmseb boehmseb commented Sep 24, 2023

Compile-time configurable projects can now be configured using patches.
Therefore, patches can specify a list of feature_tags.

Case studies can contain a configuration map with PatchConfigurations that contains a mapping from config id to a list of feature tags associated with this configuration.

Configuration patches are selected by matching their feature tags to the feature tags of the given configuration.

Since there are multiple types of configuration maps now, their type must be specified using the key config_type in case study files.

@boehmseb boehmseb requested review from vulder and LuAbelt September 24, 2023 13:39
@codecov
Copy link

codecov bot commented Sep 24, 2023

Codecov Report

Attention: 22 lines in your changes are missing coverage. Please review.

Comparison is base (4b0e29b) 68.30% compared to head (d684ba1) 68.34%.

❗ Current head d684ba1 differs from pull request most recent head 1978199. Consider uploading reports for the commit 1978199 to get more accurate results

Additional details and impacted files
@@             Coverage Diff              @@
##           vara-dev     #839      +/-   ##
============================================
+ Coverage     68.30%   68.34%   +0.04%     
============================================
  Files           333      334       +1     
  Lines         25762    25856      +94     
============================================
+ Hits          17597    17672      +75     
- Misses         8165     8184      +19     
Files Coverage Δ
tests/paper/test_case_study.py 100.00% <ø> (ø)
tests/provider/test_patch_provider.py 100.00% <100.00%> (ø)
varats-core/varats/experiment/workload_util.py 91.80% <100.00%> (+0.89%) ⬆️
varats-core/varats/mapping/configuration_map.py 94.44% <100.00%> (+0.10%) ⬆️
varats-core/varats/project/project_util.py 87.97% <ø> (-0.92%) ⬇️
...arats-core/varats/provider/patch/patch_provider.py 90.00% <100.00%> (+1.88%) ⬆️
varats-core/varats/utils/filesystem_util.py 94.11% <100.00%> (ø)
varats/varats/projects/c_projects/xz.py 66.03% <100.00%> (+0.65%) ⬆️
varats-core/varats/paper/case_study.py 85.77% <77.77%> (-0.47%) ⬇️
varats-core/varats/project/varats_command.py 90.32% <90.32%> (ø)
... and 2 more

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@boehmseb boehmseb marked this pull request as ready for review September 26, 2023 11:55
Copy link
Contributor

@vulder vulder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, except for the mypy error. I'm not sure how to type this correctly.

@boehmseb
Copy link
Member Author

Looks good, except for the mypy error. I'm not sure how to type this correctly.

Thing is, you cannot type-hint lambdas. One solution would be to make it a function instead (which is a bit overkill imo).
I don't know why mypy triggers here in the first place. Other locations where we use map with a lambda are fine.

@vulder vulder merged commit abf1d92 into vara-dev Sep 27, 2023
8 checks passed
@vulder vulder deleted the f-PatchConfiguration branch September 27, 2023 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants